package com.wang.pages.master;

import javax.inject.Inject;

import org.apache.tapestry5.annotations.PageActivationContext;
import org.apache.tapestry5.annotations.Property;

import com.wang.entities.MasterType;
import com.wang.services.StateDAO;

public class ConstructionTypeCreate {
	
/*	@PageActivationContext
	private String username;

	public String getUsername() {
		System.out.println("建设性质(编辑用户):" + username);
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}
	
	void onActivate(String name) {
		System.out.println("##########" + name);
		username = name;
	}*/
	
	@Property
	private MasterType mastertype2;
	
	 

	@Inject
	private StateDAO dao;

	void onPrepare() {
		mastertype2 = new MasterType();
	}

	Object onSuccess() {
		
		dao.create(mastertype2);
		return ConstructionTypeList.class;
	}
}
